<template>
  <div class="center-search-container">
    <div class="center-search__bar">
      <div class="nav-search-content" style="padding-top:7px">
        <el-input
          v-model="videoTitle"
          @keyup.enter.native="searchVideoByTitle()"
          placeholder="请输入内容"
          clearable
        >
          <i slot="prefix" @click="searchVideoByTitle()" class="el-input__icon el-icon-search"></i>
        </el-input>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "headSearch",
  data() {
    return {
      videoTitle: ""
    };
  },
  methods: {
    searchVideoByTitle() {
      this.$router.push("/search/" + this.videoTitle);
      location.reload();
    }
  }
};
</script>
<style   scoped>
</style>